import {Component, OnInit} from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {TokenService} from '../token.service';




@Component({
  selector: 'app-store',
  templateUrl: './store.component.html',
  styleUrls: ['./store.component.css']
})
export class StoreComponent implements OnInit {


  constructor(private tokenService: HttpClient) {

  }

  url = 'http://193.112.113.194:8769/store/category';
  categorys;

  ngOnInit(): void {
    this.tokenService.get(this.url).subscribe(data => {
      this.categorys = data['retval'];
      console.log(data['retval'])
    }, error1 => {
      // this.tokenService.getToken();
    });
  }

}
